package gdma.hqdes.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import gdma.hqdes.bean.HqdProject;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface HqdProjectMapper extends BaseMapper<HqdProject> {

    @Select("select p.* from hqd_project p where p.year=#{year}")
    List<HqdProject> selectByYear(int year);

    @Select("select p.* from hqd_project p where p.year=#{year} and p.scope=#{scope}")
    HqdProject selectByYearAndScope(int year, int scope);

    @Select("select p.* from hqd_project p where p.year=#{year} and p.scope>=#{scope0}")
    List<HqdProject> getProjects(int year, int scope0);

}
